import { picHost } from '@/settings.js'
export default {
    methods: {
        queryshebei(files) {
            let filearr = files.split(",");
            window.open(picHost + filearr[0]);
        },

        queryhetong(files) {
            let filearr = files.split(",");
            window.open(picHost + filearr[1]);
        },
        openmore(villages) {
            this.dialogVisible = true;
            this.allvilages = villages;
        },
        getShebeiUrl(files) {
            let filearr = files.split(",");
            return picHost + filearr[0]
        },
        getHetongUrl(files) {
            let filearr = files.split(",");
            return picHost + filearr[1]
        },
        getfile(file){
            return picHost + file
        },
        sethref(i){
            return picHost + i
        },
        handleSelectionChange(val) {
            this.multipleSelection = val;
            
         },
        downloads(){               
         if(this.multipleSelection.length==0){
            this.$notify.error({
                title: "错误",
                message: "请至少选择一条记录",
              });
         }else{
            this.multipleSelection.forEach(element => {
                let filearr = element.applyFiles.split(",");
                window.open(picHost + filearr[0]);
            });                  
         }
           
        },
     
    }
}